package cn.bgs.service.impl;

import cn.bgs.dao.UserMapper;
import cn.bgs.pojo.User;
import cn.bgs.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl implements UserService {

    //依赖注入
    @Autowired
    private UserMapper userMapper;


    @Override
    public User findById(Integer id) {
        return userMapper.findById(id);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public void updateBc(User user) {
        userMapper.updateBc(user);
    }

    @Override
    public void insert(User user) {
        userMapper.insert(user);
    }

    @Override
    public void insert1(User user) {
        userMapper.insert1(user);
    }

    @Override
    public User findByMap(Map<String, Object> map) {
        return userMapper.findByMap(map);
    }

    @Override
    public Map<String, Object> findMap(Integer id) {
        return userMapper.findMap(id);
    }

    @Override
    public Map<Integer, User> findMaps(String name) {
        return userMapper.findMaps(name);
    }
}
